package com.yswy.app.controller;

import com.yswy.app.service.PollingImgService;
import com.yswy.app.service.SysConfigService;
import com.yswy.common.model.ResultModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

import static com.yswy.domain.common.util.TokenUtils.*;

@RestController
@RequestMapping("/pollingImg")
@Api(description = "活动图")
public class PollingImgController {
    @Autowired
    private PollingImgService pollingImgService;


    @RequestMapping(value = "pollingImgList", method = RequestMethod.GET)
    @ApiOperation(value = "获取活动图")
    public ResultModel pollingImgList(HttpServletRequest request  , @RequestParam(value = "type") Integer type){
        return ResultModel.ok(pollingImgService.pollingImgList(type , getChannle(request)  , getIP(request)));
    }



}
